﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.ActiveRecord.Framework;
using Castle.ActiveRecord;
using System.Reflection;
using Castle.ActiveRecord.Framework.Config;
using System.Collections;
using Castle.Core.Configuration;
using NHibernate.Cfg;
using NHibernate.Tool.hbm2ddl;
using NHibernate;

namespace Atendex.Infraestrutura.Repositórios
{
    public class InicializadorRepositorio
    {

        public static void InicializaRepositorio()
        {
            IConfigurationSource config = ActiveRecordSectionHandler.Instance;
            ActiveRecordStarter.Initialize(Assembly.Load("Atendex.Dominio"), config);
            ActiveRecordStarter.DropSchema();
            ActiveRecordStarter.CreateSchema();
            //ActiveRecordStarter.UpdateSchema();
        }

    }
}
